home *** CD-ROM | disk | FTP | other *** search
/ Workbench Design / WB Collection.iso / datatypes / clidt / misc / gcc.mk < prev    next >
Text File  |  1996-04-07  |  1KB  |  72 lines

  1. #
  2. # $PROJECT: Include Makefiles
  3. #
  4. # $VER: gcc.mk 0.1 (21.07.95)
  5. #
  6. # by
  7. #
  8. # Stefan Ruppert , Windthorststrasse 5 , 65439 Floersheim , GERMANY
  9. #
  10. # (C) Copyright 1995
  11. # All Rights Reserved !
  12. #
  13. # $HISTORY:
  14. #
  15. # 21.07.95 : 000.001 : initial
  16. #
  17.  
  18. ##############################################################################
  19. #
  20. # GNUMake GCC-C pattern rules
  21. #
  22. # These rules compiles every c and c++ source and puts the output to
  23. # the OBJDIR directory
  24. #
  25.  
  26. $(OBJDIR)/%.o: %.cc
  27.     gcc $(GCCOPTS) $(GCCDEBUG) $(GCCOPTIMIZE) $< -c -o $@
  28.  
  29. $(OBJDIR)/%.o: %.c
  30.     gcc $(GCCOPTS) $(GCCDEBUG) $(GCCOPTIMIZE) $< -c -o $@
  31.  
  32. ##############################################################################
  33. #
  34. # make prototypes
  35. #
  36.  
  37. protos:  $(PROTOS)
  38.  
  39. $(PROTOS): $(SRCS)
  40.     c:swtools/mkproto $(SRCS) TO $(PROTOS)
  41.  
  42. ##############################################################################
  43. #
  44. # rcs entry points
  45. #
  46.  
  47. checkin:
  48.     $(CI) -I -r$(VERSION).$(REVISION) -t-initial $(subst RCS,,$(wildcard *))
  49.  
  50. checkinsym:
  51.     $(CI) -I -NV$(VERSION)_$(REVISION) -r -t-initial $(subst RCS,,$(wildcard *))
  52.  
  53. checkout:
  54.     $(CO) -l $(filter-out Makefile%,$(subst RCS/,,$(wildcard RCS/*)))
  55.  
  56. ##############################################################################
  57. #
  58. # make the object directory
  59. #
  60.  
  61. $(OBJDIR):
  62.     mkdir $(OBJDIR)
  63.  
  64. ##############################################################################
  65. #
  66. # make dependency include makefile
  67. #
  68.  
  69. makedep:
  70.     gcc -MM $(SRCS) $(GCCOPTS) >$(MAKEDEP)
  71.  
  72.